#include <header.h>

int main(){

    int fd = open("1.txt", O_RDWR);
    int fd2 = open("2.txt", O_RDWR|O_CREAT, 0600);

    /*
    int num = 0;
    read(fd, &num, sizeof(int));
    write(fd2, &num, sizeof(int));
    */

    char buf[100] = {0};
    ssize_t ret  = read(fd, buf, sizeof(buf));

    write(fd2, buf, ret);


    close(fd);
    close(fd2);
    return 0;
}

